﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/AdminPage.master" AutoEventWireup="true" CodeFile="Feedback_Details.aspx.cs" Inherits="Admin_FeedbackDetails" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script type="text/javascript">
    function ShowMessage() {
        alert('Answer Feedback Successfully !');
        window.location.href = 'Feedback_Management.aspx';
    }
</script>
    <table align="center" class="style3">
        <tr>
            <td class="style3" colspan="3" 
                style="background-image: url('../images/bg_head.png'); height: 30px">
                <asp:Label ID="Label1" runat="server" Font-Bold="True" ForeColor="White" 
                    Text="Feedback Details"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="style6" style="width: 13%">
                &nbsp;</td>
            <td class="style6" style="width: 16%">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style3" style="width: 13%">
                &nbsp;</td>
            <td class="style6" style="width: 16%">
                &nbsp;</td>
            <td class="style5">
                <asp:DetailsView ID="dvFeedback" runat="server" AutoGenerateRows="False" 
                    CellPadding="4" CssClass="style3" DataKeyNames="FeedbackID" 
                    DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None" 
                    Height="50px" Width="125px">
                    <AlternatingRowStyle BackColor="White" />
                    <CommandRowStyle BackColor="#D1DDF1" Font-Bold="True" />
                    <EditRowStyle BackColor="#2461BF" />
                    <FieldHeaderStyle BackColor="#DEE8F5" Font-Bold="True" />
                    <Fields>
                        <asp:BoundField DataField="DateSent" HeaderText="DateSent" 
                            SortExpression="DateSent" />
                        <asp:BoundField DataField="Cust_Name" HeaderText="CustomerName:" 
                            SortExpression="Cust_Name" />
                        <asp:BoundField DataField="Cust_Email" HeaderText="CustomerEmail:" 
                            SortExpression="Cust_Email" />
                        <asp:BoundField DataField="Title" HeaderText="Title:" SortExpression="Title" />
                        <asp:BoundField DataField="Content" HeaderText="Content:" 
                            SortExpression="Content" />
                    </Fields>
                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                    <RowStyle BackColor="#EFF3FB" />
                </asp:DetailsView>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:OPOConnectionString %>" 
                    SelectCommand="SELECT Feedback.FeedbackID, Feedback.DateSent, Feedback.Title, Feedback.[Content], Customer.Cust_Name, Customer.Cust_Email FROM Feedback INNER JOIN Customer ON Feedback.CustID = Customer.CustID WHERE (Feedback.FeedbackID = @FeedbackID)">
                    <SelectParameters>
                        <asp:QueryStringParameter Name="FeedbackID" QueryStringField="FeedbackID" 
                            Type="Int32" />
                    </SelectParameters>
                </asp:SqlDataSource>
            </td>
        </tr>
        <tr>
            <td class="style3" style="width: 13%">
                &nbsp;</td>
            <td class="style6" style="width: 16%" valign="top">
                <asp:Label ID="Label6" runat="server" Font-Bold="True" Text="Subject:"></asp:Label>
            </td>
            <td class="style5">
                <asp:TextBox ID="txtSubject" runat="server" Width="280px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator13" runat="server" 
                    ControlToValidate="txtSubject" 
                    ErrorMessage="Subject can not be blank." Font-Bold="True" 
                    ForeColor="Red" style="font-weight: 700">*</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style3" style="width: 13%">
                &nbsp;</td>
            <td class="style6" style="width: 16%" valign="top">
                <asp:Label ID="Label5" runat="server" Font-Bold="True" Text="Answer Feedback:"></asp:Label>
            </td>
            <td class="style5">
                <asp:TextBox ID="txtAnswerFeedback" runat="server" Height="100px" 
                    TextMode="MultiLine" Width="360px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server" 
                    ControlToValidate="txtAnswerFeedback" 
                    ErrorMessage="Feedback Content can not be blank." Font-Bold="True" 
                    ForeColor="Red" style="font-weight: 700">*</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style3" style="width: 13%">
                &nbsp;</td>
            <td colspan="2">
                <asp:ValidationSummary ID="vsErro" runat="server" ForeColor="Red" />
            </td>
        </tr>
        <tr>
            <td class="style3" style="width: 13%">
                &nbsp;</td>
            <td style="width: 16%">
            </td>
            <td>
                <asp:ImageButton ID="imgbAnswer" runat="server" 
                    ImageUrl="~/images/img_Answer.png" onclick="imgbAnswer_Click" />
                <asp:ImageButton ID="imgbBack" runat="server" ImageUrl="~/images/img_Back.png" 
                    onclick="imgbBack_Click" CausesValidation="False" />
            </td>
        </tr>
        <tr>
            <td class="style3" style="width: 13%">
                &nbsp;</td>
            <td class="style6" style="width: 16%">
            </td>
            <td class="style5">
                &nbsp;</td>
        </tr>
    </table>
</asp:Content>

